package com.wmh.baseservice.user.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author wmh generator
 * @since 2023-02-04
 */
@ApiModel(value="UsParentOrder对象", description="用户总订单表")
public class UsParentOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "状态:	0待付款	1已付款	2商家已扫码核验(自提或者商家提前帮忙打包好)	3待评价	4已完成	-1已取消	-2已退款	")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "总订单号")
    private String orderNum;

    @ApiModelProperty(value = "子订单号")
    private String sonOrder;

    @ApiModelProperty(value = "用户id")
    private Long usId;

    @ApiModelProperty(value = "类型1:果蔬")
    private Integer type;

    @ApiModelProperty(value = "售后状态:	0:未申请售后	1:申请退款中	2:退款完成")
    private Integer afterSalesStatus;

    @ApiModelProperty(value = "支付时间")
    private Date payTime;

    public Long getId() {
        return id;
    }

    public UsParentOrder setId(Long id) {
        this.id = id;
        return this;
    }

    public Integer getStatus() {
        return status;
    }

    public UsParentOrder setStatus(Integer status) {
        this.status = status;
        return this;
    }

    public String getRemark() {
        return remark;
    }

    public UsParentOrder setRemark(String remark) {
        this.remark = remark;
        return this;
    }

    public Integer getVersion() {
        return version;
    }

    public UsParentOrder setVersion(Integer version) {
        this.version = version;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public UsParentOrder setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public UsParentOrder setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public String getOrderNum() {
        return orderNum;
    }

    public UsParentOrder setOrderNum(String orderNum) {
        this.orderNum = orderNum;
        return this;
    }
    public String getSonOrder() {
        return sonOrder;
    }

    public UsParentOrder setSonOrder(String sonOrder) {
        this.sonOrder = sonOrder;
        return this;
    }
    public Long getUsId() {
        return usId;
    }

    public UsParentOrder setUsId(Long usId) {
        this.usId = usId;
        return this;
    }
    public Integer getType() {
        return type;
    }

    public UsParentOrder setType(Integer type) {
        this.type = type;
        return this;
    }
    public Integer getAfterSalesStatus() {
        return afterSalesStatus;
    }

    public UsParentOrder setAfterSalesStatus(Integer afterSalesStatus) {
        this.afterSalesStatus = afterSalesStatus;
        return this;
    }
    public Date getPayTime() {
        return payTime;
    }

    public UsParentOrder setPayTime(Date payTime) {
        this.payTime = payTime;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String ORDER_NUM = "order_num";

    public static final String SON_ORDER = "son_order";

    public static final String US_ID = "us_id";

    public static final String TYPE = "type";

    public static final String AFTER_SALES_STATUS = "after_sales_status";

    public static final String PAY_TIME = "pay_time";

    @Override
    public String toString() {
        return "UsParentOrder{" +
            "id=" + id +
            ", status=" + status +
            ", remark=" + remark +
            ", version=" + version +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", orderNum=" + orderNum +
            ", sonOrder=" + sonOrder +
            ", usId=" + usId +
            ", type=" + type +
            ", afterSalesStatus=" + afterSalesStatus +
            ", payTime=" + payTime +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            UsParentOrder.ID
            ,UsParentOrder.STATUS
            ,UsParentOrder.REMARK
            ,UsParentOrder.VERSION
            ,UsParentOrder.CREATE_TIME
            ,UsParentOrder.UPDATE_TIME
            ,UsParentOrder.ORDER_NUM
            ,UsParentOrder.SON_ORDER
            ,UsParentOrder.US_ID
            ,UsParentOrder.TYPE
            ,UsParentOrder.AFTER_SALES_STATUS
            ,UsParentOrder.PAY_TIME
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}